package com.kancy.stream.rabbit.handler;

import com.kancy.stream.rabbit.entity.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * UserMessageHandler
 *
 * @author kancy
 * @date 2020/3/8 20:22
 */
@Component
public class UserMessageHandler implements MessageHandler<User> {
    private static Logger log = LoggerFactory.getLogger(UserMessageHandler.class);
    /**
     * 监听消息
     *
     * @param payload
     * @throws Exception
     */
    @Override
    public void onMessage(User payload) {
        log.info("接收信息：{}" , payload);
    }
}
